﻿@model ICollection<CloudFranceTriple.WebRole.Models.ExternalLogin>

@if (Model.Count > 0)
{
    <h3>@CloudFranceTriple.WebRole.Properties.Resources.LoginExternalRegistredLoginTitle</h3>
    <table style="border: 1px solid #fffffe; width: 452px;">
        <tbody>
            @foreach (CloudFranceTriple.WebRole.Models.ExternalLogin externalLogin in Model)
            {
                <tr style="width: 432px;">
                    <td style="padding-left: 10px;">@externalLogin.ProviderDisplayName</td>
                    <td>
                        @if (ViewBag.ShowRemoveButton)
                        {
                            using (Html.BeginForm("Disassociate", "Account", new { area = "" }))
                            {
                            @Html.AntiForgeryToken()
                            <div>
                                @Html.Hidden("provider", externalLogin.Provider)
                                @Html.Hidden("providerUserId", externalLogin.ProviderUserId)
                                <input type="submit" value="@CloudFranceTriple.WebRole.Properties.Resources.ButtonRemove"
                                     title="@String.Format("{0} {1}", CloudFranceTriple.WebRole.Properties.Resources.LoginExternalRemoveLink, externalLogin.ProviderDisplayName)" />
                            </div>
                            }
                        }
                        else
                        {
                            @: &nbsp;
                    }
                    </td>
                </tr>
            }
        </tbody>
    </table>
}
